package com.example.runlian.service.impl;

import com.example.runlian.mapper.SecondTitleMapper;
import com.example.runlian.pojo.PageInfo;
import com.example.runlian.pojo.SecondTitle;
import com.example.runlian.service.SecondTitleService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 副标题逻辑处理 实现
 */
@Service
public class SecondTitleServiceImpl implements SecondTitleService {
    @Autowired
    private SecondTitleMapper secondTitleMapper;

    @Override
    public List<SecondTitle> getSecondTitleByMid(PageInfo pageInfo) {
        return secondTitleMapper.querySecondTitleByPage(pageInfo);
    }

    @Override
    public List<SecondTitle> getSecondTitleByPage(PageInfo pageInfo) {
        return secondTitleMapper.querySecondTitleByPage(pageInfo);
    }

    @Override
    public Integer querySecondTitleNum() {
        return secondTitleMapper.qeurySecondTitleNum();
    }

    @Override
    public Integer updateSecondTitleBySid(SecondTitle secondTitle) {
        return secondTitleMapper.updateSecondTitleBySid(secondTitle);
    }

    @Override
    public Integer addSecondTitle(SecondTitle secondTitle) {
        return secondTitleMapper.addSecondTitle(secondTitle);
    }

    @Override
    public Integer deleteSecondTitle(Integer sid) {
        return secondTitleMapper.deleteSecondTitleBySid(sid);
    }


}
